<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $title_for_layout; ?> - Vedecké projekty na FMFI UK
	</title>
	<?php
		echo $this->Html->meta('icon');

		//echo $this->Html->css('temp');
		echo $this->Html->css('style');
		echo '<!--[if IE]>';
        echo $this->Html->css('styleIE');
    	echo '<![endif]-->';
    	
    	echo $this->Html->script('functions');

		echo $scripts_for_layout;
	?>
</head>
<body>
	<div id="wrapper">
      	<div id="header"> 
        	<div id="header_left"><img src="<?php echo BASE_URL; ?>/img/fakulta_logo_02.png" alt="FMFI" /></div>
        	<div id="header_center"><img src="<?php echo BASE_URL; ?>/img/projekt_logo.png" alt="Vedecké projekty na FMFI UK" /></div>
        	<div id="header_right"><img src="<?php echo BASE_URL; ?>/img/univerzita_logo_02.png" alt="UK" /></div>
      	</div>
      	<div id="login">
			<?php if ($this->Session->check('Auth.User')) { 
					echo $this->Html->link($this->Session->read('Auth.User.username'), array('admin' => true,'controller' => 'users', 'action' => 'profile'), array());
					echo ' | ';
					echo $this->Html->link('Odhlásiť', array('admin' => false,'controller' => 'users', 'action' => 'logout'), array());
				  } 
				  else { 
					
					echo $this->Form->create('User', array('url' => array('controller' => 'users', 'action' => 'login')));
						
					echo $this->Form->input('User.username', array('label' => 'Meno: ', 'class' => 'input-text medium', 'onfocus' => 'get_focus(this)', 'onblur' => 'lose_focus(this)', 'div' => false));
					echo $this->Form->input('User.password', array('label' => 'Heslo: ' , 'class' => 'input-text medium', 'onfocus' => 'get_focus(this)', 'onblur' => 'lose_focus(this)', 'div' => false));
					echo $this->Form->submit('Prihlásiť', array('class' => 'input-submit', 'div' => false));
					
					echo $this->Form->end();
				 }  
			?>
		</div>
		<div id="navig">
      		<?php 
      			//render menu helper
				 echo $this->Menu->render();
      		?>
      	</div>	
			
		<div id="content">

			<?php echo $this->Session->flash(); ?>

			<?php echo $content_for_layout; ?>

		</div>
		<div id="footer">
			Vedecké projekty na FMFI UK &copy; 2011 <a href="http://fmph.uniba.sk" title="Fakulta matematiky, fyziky a informatiky">Fakulta matematiky, fyziky a informatiky UK</a>
		</div>
	</div>
	<?php echo $this->element('sql_dump'); ?>
</body>
</html>